/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wwy
 * Date: 2024-05-01
 * Time: 19:57
 */
//在同一个类中定义多个方法：要求不仅可以求2个整数的最大值，还可以求3个小数的最大值？
public class w {
    public static void main(String[] args) {
        System.out.println(add(1,2));
        System.out.println(add(1,2,3.1));
    }
    public static int add(int a,int b){
        return a>b?a:b;
    }
    public  static double add(double a,double b,double c){
        double d=a>b?a:b;
        return c>d?c:d;
    }
}
